package com.chengn.threadlocal;

public class ThreadLocalTest {
    public static void main(String[] args) {
        ThreadLocal<Integer> threadLocal = new ThreadLocal<>();

        threadLocal.set(1);
        System.out.println(threadLocal.get());
        new Thread(() -> {
            System.out.println("新建线程get：" + threadLocal.get());
        }).start();


    }
}
